<%-- 
    Document   : editLocum
    Created on : 31 Oct, 2012, 6:08:56 PM
    Author     : sagar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<link type="text/css" href="css/main.css" rel="stylesheet" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<%@include file="../common/script.jsp" %>
<script type="text/javascript" src="../js/googleMap.js" ></script>
<!DOCTYPE html>
<script type="text/javascript">
    var rules=new Array();
    rules[0]='locumName|required|Please Enter Locum Name';
    rules[1]='address|required|Please Enter Address';
    rules[2]='zoneId|required|Please Select Zone';
    rules[3]='contact1|required|Please Enter Contact1';
    //rules[4]='contact2|required|Please Enter Contact2';
    rules[4]='latitude|required|Required latitude pixel';
    rules[5]='longitude|required|Required longitude pixel';
    rules[6]='locumType|required|Required Locum Type ';
</script>
<script type="text/javascript">
    function getLatLog(){
        var location = new google.maps.LatLng(${locum.latitude}, ${locum.longitude});      
        marker.setPosition(location);             
        map.setCenter(location);
    }
</script>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body onLoad="yav.init('form1',rules,'inline');getLatLog();">
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div style="width: 20%;  position: absolute; top:150px; left:20px; font:normal 12px/normal Arial;">
            <%@include file="../common/message.jsp" %>
            <form:form id="form1" name="form1" modelAttribute="locum"  method="POST" >
                <fieldset>
                    <legend><spring:message code="title.editLocum"/></legend>
                    <table class="formTable">
                        <tr>
                            <td><spring:message code="locumName"/>:<br/>
                                <form:input path="locumName" id="locumName" cssClass="userInputLarge"/>
                                <br/><span id="errorsDiv_locumName"></span></td>

                            <td><spring:message code="address"/>:<br/>
                                <form:textarea path="address" id="address" cssClass="userInputLarge"/>
                                <br/><span id="errorsDiv_address"></span></td>
                        </tr>
                        <tr>
                            <td><spring:message code="contact1"/>:<br/>
                                <form:input path="contact1" id="contact1" cssClass="userInputLarge"/>
                                <br/><span id="errorsDiv_contact1"></span></td>
                            <td><spring:message code="contact2"/>:<br/>
                                <form:input path="contact2" id="contact2" cssClass="userInputLarge"/>
                                <br/><span id="errorsDiv_contact2"></span></td>
                        </tr>
                        <tr>
                            <td><spring:message code="timing1"/>:<br/>
                                <form:input path="timing" class="userInputLarge"/>
                            </td>
                        </tr>
                        <tr>
                            <td><spring:message code="selectZone"/>:<br/>
                                <form:select  path="zoneId.zoneId" id="zoneId" style="margin-bottom: 5px">
                                    <form:option value="" label="-"></form:option>
                                    <form:options items="${zoneList}" itemLabel="zoneName" itemValue="zoneId"></form:options>
                                </form:select>
                                <br/><span id="errorsDiv_zoneId"></span>
                            </td>
                             <td><spring:message code="locumType"/>:<br/>
                                <form:select  path="locumType" id="locumType" style="margin-bottom: 5px" cssClass="userInputMedium">
                                    <form:option value="" label="-"></form:option>
                                    <form:option title="HS" value="HS"></form:option>
                                    <form:option title="HST" value="HST"></form:option>

                                    
                                </form:select>
                                <br/><span id="errorsDiv_locumType"></span>
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <td>Latitude:<br/>
                                <form:input path="latitude" id="latitude" cssClass="userInputLarge"/>
                                <br/><span id="errorsDiv_latitude"></span></td>

                            <td>Longitude:<br/>
                                <form:input path="longitude" id="longitude" cssClass="userInputLarge"/>
                                <br/><span id="errorsDiv_longitude"></span></td>

                        </tr>

                        <tr>
                            <td><input type="button" name="btnCancel" value="<spring:message code="button.Cancel"/>" onclick="location.href='../locum/listLocum.htm'" /></td>   
                            <td><input type="submit" name="btnSubmit" value="<spring:message code="button.Update"/>" onclick="return yav.performCheck('form1', rules, 'inline');"/></td>

                        </tr>
                    </table>
                </fieldset>
            </form:form>
        </div>
        <div style="width: 53%;  position: absolute; top:150px; right:20px; font:normal 12px/normal Arial;">
            <div id="map_canvas"></div><br/>
        </div> 
    </body>
</html>
